<template>
<div>
    <transitionfade>
    <div class="gohead" v-show="headshow">
      <router-link to="/">
      <img src="/static/images/back.png">
      </router-link>
      <h2>景点详情</h2>
    </div>
    </transitionfade>
</div>
</template>

<script>
import transitionfade from '@/components/common/transition.vue'
export default {
  name: 'gohead',
  components:{transitionfade},
  data () {
    return {
        headshow:false,
    }
  },
  mounted(){
     window.onscroll = ()=>{
        var gun = document.documentElement.scrollTop || document.body.scrollTop;
        if(gun>140){
            this.headshow = true;
        }else{
            this.headshow = false;
        }
     }
      
      
  }
}
</script>

<style scoped>
  .gohead{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 88px;
    z-index: 50;
    line-height: 88px;
    background: #00bcd4;
  }
  .gohead img{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 30px;
    width: 23px;
    height: 41px;
  }
  .gohead h2{
    text-align: center;
    font-size: 32px;
    color: #fff;
  }
</style>
